home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <bindings id="placesBindings"
- xmlns="http://www.mozilla.org/xbl"
- xmlns:xbl="http://www.mozilla.org/xbl"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
- <!-- XXXben - replace this upon checkin by allowing generic textboxes to show
- arbitrary content before the html:input itself using a
- <children/> -->
- <binding id="textbox-timed-arbitrary"
- extends="chrome://global/content/bindings/textbox.xml#timed-textbox">
- <resources>
- <stylesheet src="chrome://browser/skin/places/places.css"/>
- </resources>
- <content>
- <children/>
- <xul:hbox class="textbox-input-box" flex="1" xbl:inherits="context">
- <html:input class="textbox-input" flex="1" anonid="input"
- xbl:inherits="onfocus,onblur,value,type,maxlength,disabled,size,readonly,tabindex,accesskey"/>
- </xul:hbox>
- <xul:hbox>
- <xul:button class="textbox-input-closebutton"/>
- </xul:hbox>
- </content>
- <implementation>
- <method name="reset">
- <body><![CDATA[
- this.removeAttribute("filtered");
- ]]></body>
- </method>
- <method name="_resetInternal">
- <body><![CDATA[
- this.value = "";
- this.reset();
-
- var event = document.createEvent("Events");
- event.initEvent("reset", true, true);
-
- var cancel = !this.dispatchEvent(event);
- var handler = this.getAttribute("onreset");
- if (handler) {
- var handlerFunction = new Function("event", handler);
- handlerFunction(event);
- }
- ]]></body>
- </method>
- </implementation>
- <handlers>
- <handler event="click"><![CDATA[
- if (event.originalTarget.className == "textbox-input-closebutton") {
- this.inputField.focus();
- this._resetInternal();
- }
- ]]></handler>
- <handler event="keypress" keycode="VK_ESCAPE"><![CDATA[
- this._resetInternal();
- ]]></handler>
- </handlers>
- </binding>
-
- <binding id="command-button" extends="chrome://global/content/bindings/button.xml#button">
- <implementation>
- <method name="updateActiveView">
- <body><![CDATA[
- if (this.hasAttribute("view"))
- PlacesController.activeView = document.getElementById(this.getAttribute("view"));
- ]]></body>
- </method>
- </implementation>
- <handlers>
- <handler event="click" button="0" action="this.updateActiveView();"/>
- <handler event="keypress" keycode="VK_SPACE" action="this.updateActiveView();"/>
- </handlers>
- </binding>
-
- <binding id="filter-button" extends="chrome://global/content/bindings/button.xml#menu">
- <content>
- <xul:stack flex="1" class="box-inherit button-box">
- <xul:image class="button-icon" xbl:inherits="src=image"/>
- <xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled"/>
- </xul:stack>
- <children includes="menupopup"/>
- </content>
- <handlers>
- <handler event="command"><![CDATA[
- PlacesSearchBox.filterCollection = event.target.getAttribute("value");
- ]]></handler>
- </handlers>
- </binding>
-
-
- </bindings>
-